package com.suray.wcs.service.test.type;

public enum ActionTestType {
    PALLET_ACTION(1, "托盘动作"),
    DIRECTION_ACTION(2, "换向动作"),
    ;

    int value;
    String des;
    ActionTestType(int value, String des) {
        this.value = value;
        this.des = des;
    }

    public int getValue() {
        return value;
    }

    public static ActionTestType parseAction(int value) {
        for (ActionTestType action : ActionTestType.values()) {
            if (action.getValue() == value) {
                return action;
            }
        }

        throw new IllegalArgumentException("动作参数错误:" + value);
    }

    @Override
    public String toString() {
        return des;
    }
}
